﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Arcana.Contract.Tests.Argument.Is.Not
{
    [TestClass]
    public class InstanceOfAttributeTest
    {
        [Arcana.Contract.Argument.Is.Not.InstanceOf("x", typeof(System.Exception))]
        private static void Target_1(object x)
        {
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        [ExpectedException(typeof(System.ArgumentException))]
        public void ShouldThrowException()
        {
            Target_1(new System.Exception());
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass()
        {
            Target_1(null);
            Target_1(new ArgumentNullException());
        }
    }
}
